package com.newasia.management.dto.user.login;

import com.newasia.commons.result.AbstractRequest;
import com.newasia.commons.tool.exception.ValidateException;
import com.newasia.management.constants.ManagementRetCode;
import lombok.Data;
import org.apache.commons.lang3.StringUtils;

@Data
public class SysUserUpdateRequest extends AbstractRequest {

    private Long userId;
    private String userName;
    private String userPwd;
    private String salt;
    private String mobile;
    private String email;
    private String companyName;
    private String file;
    private Long roleId;
    private String state;

    @Override
    public void requestCheck() {
        if(userId==null){
            throw new ValidateException(ManagementRetCode.REQUEST_CHECK_FAILURE.getCode(),
                    ManagementRetCode.REQUEST_CHECK_FAILURE.getMessage());
        }
    }
}
